Jasper St. Pierre [Thu, 27 Nov 2014 02:10:43 +0000 (18:10 -0800)]
gtkentry: Optimize GtkStyleContext usage
Jasper St. Pierre [Thu, 27 Nov 2014 02:10:36 +0000 (18:10 -0800)]
gtklabel: Optimize GtkStyleContext usage
Jasper St. Pierre [Thu, 27 Nov 2014 02:10:29 +0000 (18:10 -0800)]
gtkstylecontext: Optimize GtkStyleContext usage
Jasper St. Pierre [Thu, 27 Nov 2014 02:10:21 +0000 (18:10 -0800)]
gtktextdisplay: Optimize GtkStyleContext usage
Jasper St. Pierre [Thu, 27 Nov 2014 01:07:56 +0000 (17:07 -0800)]
gdkdisplay-x11: Don't do extra work when simply moving the window
We shouldn't bother recalculating all the visible regions and wiping
away the old updating areas if we're simply dragging the window around.
Matthias Clasen [Wed, 26 Nov 2014 23:38:43 +0000 (18:38 -0500)]
GtkSpinButton: Use the proper state
Use the style contexts current state when querying it.
Carlos Garnacho [Wed, 26 Nov 2014 14:30:52 +0000 (15:30 +0100)]
popover: Send key events only to the focus widget
gtk_window_propagate_key_event() will run unstopped from the focus widget up to the
popover if GDK_EVENT_PROPAGATE was returned along the chain, resulting in infinite
recursion. This could be just triggered by pressing some modifier key on an entry...
Sebastien Lafargue [Wed, 26 Nov 2014 12:53:30 +0000 (13:53 +0100)]
textbtree: Remove unneeded check
Benjamin Otte [Tue, 25 Nov 2014 22:21:48 +0000 (23:21 +0100)]
range: Remove unnecessary argument
It's always the same value passed in, so just use that value directly.
Benjamin Otte [Tue, 25 Nov 2014 22:13:21 +0000 (23:13 +0100)]
range: Query slider position instead of updating it
We're updating it later in the function, there's no need to do it here.
Benjamin Otte [Tue, 25 Nov 2014 22:12:08 +0000 (23:12 +0100)]
gtkrange: Fix copy/paste error
When factoring out a function in
b88584e7bae9bacbda8bd0d9868cbe50eb8e218d I forgot to adapt these values.
Benjamin Otte [Tue, 25 Nov 2014 21:00:11 +0000 (22:00 +0100)]
range: Setting stepper visibility requires a restyle
Benjamin Otte [Tue, 25 Nov 2014 20:57:58 +0000 (21:57 +0100)]
entry: Use correct state when computing icon padding
Emmanuele Bassi [Wed, 19 Nov 2014 14:43:10 +0000 (14:43 +0000)]
Freeze file system model during editing
If a file system event arrives while GtkFileChooserWidget is asking the
user to edit the name of a newly created folder, the file system model
will drop the row with the editable cell, and the user will have to
start from scratch.
This makes creating new directories impossible inside a directory with a
file currently being downloaded, for instance, and it's really unhelpful
to the user because the editable row simply disappears.
We already have a mechanism in place to freeze the file system model, so
we can reuse it between the add_editable() and the remove_editable()
calls.
https://bugzilla.gnome.org/show_bug.cgi?id=729927
Andre Heinecke [Mon, 24 Nov 2014 09:59:32 +0000 (10:59 +0100)]
Remove overzealous validity check for secrets
We directly get the length of the secret from the g_variant
and use it in a following g_strndup which ensures that the
resulting string is terminated.
This fixes reading secrets which were stored by system-config-printer.
https://bugzilla.gnome.org/show_bug.cgi?id=740612
Joanmarie Diggs [Thu, 20 Nov 2014 15:19:52 +0000 (10:19 -0500)]
GtkButtonAccessible: Stop emitting state-change signals for ATK_STATE_ARMED
ATK_STATE_ARMED is now deprecated. There is no replacement.
https://bugzilla.gnome.org/show_bug.cgi?id=740438
Emmanuele Bassi [Wed, 19 Nov 2014 15:50:55 +0000 (15:50 +0000)]
docs: Fix annotation for GtkCssProviderError
https://bugzilla.gnome.org/show_bug.cgi?id=740374
Jasper St. Pierre [Tue, 25 Nov 2014 19:21:21 +0000 (11:21 -0800)]
Revert part of "gtknotebook: Optimize GtkStyleContext usage"
This reverts part of commit
c71e2131345c929753a0128c780d679ce0c4ce6a.
This part was unfinished and was pushed simply to avoid the warnings.
Jasper St. Pierre [Tue, 25 Nov 2014 19:07:31 +0000 (11:07 -0800)]
gtkstylecontext: Add an optional warning when misusing GtkStyleContext
This allows someone to quickly debug more performance issues with
G_DEBUG=fatal-warnings.
Jasper St. Pierre [Tue, 25 Nov 2014 19:05:57 +0000 (11:05 -0800)]
gtkcellarea: Optimize GtkStyleContext usage
This is a bit bizarre, but the cell renderer can apply different
flags from the actual style context, and we should use those instead
of the widget flags.
Jasper St. Pierre [Tue, 25 Nov 2014 19:05:49 +0000 (11:05 -0800)]
gtknotebook: Optimize GtkStyleContext usage
Jasper St. Pierre [Tue, 25 Nov 2014 19:05:36 +0000 (11:05 -0800)]
gtkwindow: Optimize GtkStyleContext usage
Jasper St. Pierre [Tue, 25 Nov 2014 19:05:04 +0000 (11:05 -0800)]
deprecated/gtkstyle: Optimize GtkStyleContext usage
Even though this is deprecated, it's still initialized for every
screen at startup, so let's minimize the cost.
Jasper St. Pierre [Tue, 25 Nov 2014 01:07:01 +0000 (17:07 -0800)]
gtkentry: Pass the correct set of state flags to gtk_style_context_get*
This eliminates a lot of overhead in the CSS engine recalculating
cached CSS rules, and is overall the correct thing to do.
Jasper St. Pierre [Tue, 25 Nov 2014 00:56:23 +0000 (16:56 -0800)]
gtkwidget: Remove unnecessary code in get_state_flags
Any time has_focus is called, we will call gtk_widget_update_state_flags
which will assign the state flags properly.
Benjamin Otte [Tue, 25 Nov 2014 18:33:18 +0000 (19:33 +0100)]
testsuite: Add a bunch of parsing tests for :not()
Benjamin Otte [Tue, 25 Nov 2014 18:31:23 +0000 (19:31 +0100)]
cssselector: Add none selector
We apparently didn't yet parse :not(*), so write a selector for this.
Benjamin Otte [Tue, 25 Nov 2014 18:15:36 +0000 (19:15 +0100)]
cssselector: Add initial support for :not()
:not() works for names, ids, classes and pseudoclasses based on states.
It does not yet work for positional pseudoclasses (like :last-child or
:even) as there is region madness going on with those.
Benjamin Otte [Tue, 25 Nov 2014 17:51:13 +0000 (18:51 +0100)]
cssselector: Macroify simple selectors
This is in preparation for the next commits.
Benjamin Otte [Fri, 21 Nov 2014 07:50:38 +0000 (08:50 +0100)]
range: Don't duplicate work
The adjustment value being equal is checked by
gtk_adjustment_set_value() and the necessity of calc_layout() is handled
by the value_changed signal handler.
Benjamin Otte [Fri, 21 Nov 2014 07:29:37 +0000 (08:29 +0100)]
range: Don't invalidate layout when computing marks
We now have a function to compute a slider position. Use that one
instead.
Benjamin Otte [Fri, 21 Nov 2014 07:24:51 +0000 (08:24 +0100)]
range: Split out a function
The position of a slider for a given value is something we care a
lot about and jump through hoops to get. See next commit for example.
Benjamin Otte [Fri, 21 Nov 2014 07:15:54 +0000 (08:15 +0100)]
range: Remove 2 variables
Instead, compute their value on-demand.
Benjamin Otte [Fri, 21 Nov 2014 07:00:52 +0000 (08:00 +0100)]
range: Remove unused variable
Benjamin Otte [Fri, 21 Nov 2014 06:26:19 +0000 (07:26 +0100)]
scale: Always be flippable
GtkRange only flips horizontal ranges, so there's no need to unset it
for vertical scales.
Also, set_flippable() is a cute name.
Benjamin Otte [Fri, 21 Nov 2014 06:16:12 +0000 (07:16 +0100)]
range: Simplify defines
- Delete unused defines
- Don't have 2 defines that are multiplied later
Benjamin Otte [Tue, 18 Nov 2014 17:49:17 +0000 (18:49 +0100)]
range: Deprecate detail strings in class struct
... and stop setting them.
Benjamin Otte [Tue, 18 Nov 2014 17:21:49 +0000 (18:21 +0100)]
range: Remove unused detail quarks
Benjamin Otte [Tue, 18 Nov 2014 16:48:07 +0000 (17:48 +0100)]
range: Remove unused variable
Matthias Clasen [Tue, 25 Nov 2014 13:42:26 +0000 (08:42 -0500)]
inspector: Make close buttons in search bars have no relief
Make our home-grown searchbar lookalike look more alike.
Carlos Garnacho [Tue, 25 Nov 2014 12:54:25 +0000 (13:54 +0100)]
popover: Forward key events to focus widget while visible/modal
This is the expected behavior while the popover keeps the grab, leaving
this up to the toplevel implementation gives place to key handlers
connected there to handle the event otherwise, and maybe redirect key
events somewhere else.
Matthias Clasen [Tue, 25 Nov 2014 05:14:47 +0000 (00:14 -0500)]
GtkStack: silently ignore visible-child-name set to NULL
This can happen when loading empty stacks in glade.
Matthias Clasen [Tue, 25 Nov 2014 01:36:00 +0000 (20:36 -0500)]
inspector: minor cleanup
Ray Strode [Fri, 21 Nov 2014 19:17:06 +0000 (14:17 -0500)]
testsuite: add hide-titlebar-when-maximized test for GtkWindow
This commit adds a test that checks whether or not
hide-titlebar-when-maximized can be set before the window is
realized.
https://bugzilla.gnome.org/show_bug.cgi?id=740287
Matthias Clasen [Mon, 24 Nov 2014 15:01:54 +0000 (10:01 -0500)]
Make scale=2 work again
There was a leftover HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE ifdef
that broke things, now that we don't use this define anymore.
Chun-wei Fan [Mon, 24 Nov 2014 03:05:18 +0000 (11:05 +0800)]
gdkgl.c: Avoid GCCism in Pointer Arithmetic
NULL-plus-something could be seen by the compiler to attempt to do
arithmetic with void *, which is a GCCism. Instead, do the math normally
and cast the results as a void *.
https://bugzilla.gnome.org/show_bug.cgi?id=740605
Matthias Clasen [Mon, 24 Nov 2014 11:49:19 +0000 (06:49 -0500)]
Keep gtk_window_set_hide_titlebar_when_maximized working
This broke in
510c2cdfb6362568f4384790dc06e0b1b4aba0e5.
https://bugzilla.gnome.org/show_bug.cgi?id=740287
Matthias Clasen [Mon, 24 Nov 2014 01:34:26 +0000 (20:34 -0500)]
Bump version
Matthias Clasen [Sat, 22 Nov 2014 02:42:52 +0000 (21:42 -0500)]
3.15.2
Matthias Clasen [Mon, 24 Nov 2014 00:30:14 +0000 (19:30 -0500)]
Add missing api to the docs
Matthias Clasen [Mon, 24 Nov 2014 00:16:49 +0000 (19:16 -0500)]
GtkModelButton: Add docs
Matthias Clasen [Sun, 23 Nov 2014 23:52:45 +0000 (18:52 -0500)]
Update expected results
Matthias Clasen [Sun, 23 Nov 2014 23:29:04 +0000 (18:29 -0500)]
notify test: Exclude a few new properties
The button properties don't make sense on GtkModelButton (indicating
that GtkModelButton should really not be a GtkButton subclass).
Matthias Clasen [Sun, 23 Nov 2014 23:25:35 +0000 (18:25 -0500)]
GtkGLArea: avoid extraneous property notifications
Matthias Clasen [Sun, 23 Nov 2014 20:05:01 +0000 (15:05 -0500)]
GtkModelButton: specify the proper default values
Caught by the defaultvalue test: ::text starts out as "", and
::iconic should be FALSE by default.
Carlos Garnacho [Tue, 11 Nov 2014 11:07:24 +0000 (12:07 +0100)]
wayland: Pass shadow width to the compositor
Use xdg_surface_set_window_geometry() to tell the compositor about the
shadow widths, this makes some gnome-shell/mutter features (edge resistance,
frames around windows in the overview, side maximization, ...) work alright
with GTK+.
In order to add this, some other places in gdkwindow-wayland had to gain
some knowledge about margins:
- xdg_surface_configure() now syncs the shadow after applying the state,
and gdk_wayland_window_set_shadow_width() possibly reconfigures the
window in order to preserve window geometry. This is necessary to keep
shadows in sync with state/geometry changes, as this does not happen
all at once.
- xdg_popups relative to an xdg_surface are shown relative to buffer
coordinates, so the left/top margins must be added there.
https://bugzilla.gnome.org/show_bug.cgi?id=736742
Matthias Clasen [Sun, 23 Nov 2014 02:37:39 +0000 (21:37 -0500)]
inspector: Show object title in menu tab
Matthias Clasen [Sun, 23 Nov 2014 02:33:57 +0000 (21:33 -0500)]
inspector: Add menu models to the tree
Add both the appmenu and the menubar models as children of the
application, if they exist.
Matthias Clasen [Sun, 23 Nov 2014 01:56:49 +0000 (20:56 -0500)]
inspector: Show object title in size groups tab
Matthias Clasen [Sun, 23 Nov 2014 01:13:26 +0000 (20:13 -0500)]
inspector: Show object title in data tab
Matthias Clasen [Sat, 22 Nov 2014 21:21:39 +0000 (16:21 -0500)]
inspector: Show object title on the style property list
As with the property list, this replaces the search bar by
a stack containing a search entry.
Matthias Clasen [Sat, 22 Nov 2014 21:21:17 +0000 (16:21 -0500)]
inspector: Show object title on selector tab
Matthias Clasen [Sat, 22 Nov 2014 20:40:24 +0000 (15:40 -0500)]
inspector: Show object title in actions tab
Matthias Clasen [Sat, 22 Nov 2014 18:54:16 +0000 (13:54 -0500)]
inspector: Show object title in hierarchy tab
Matthias Clasen [Sat, 22 Nov 2014 18:41:21 +0000 (13:41 -0500)]
inspector: Show object title in the classes tab
Matthias Clasen [Sat, 22 Nov 2014 18:26:53 +0000 (13:26 -0500)]
inspector: Show object title in the css tab
Matthias Clasen [Sat, 22 Nov 2014 18:12:41 +0000 (13:12 -0500)]
inspector: Show object title in the gestures tab
Matthias Clasen [Sat, 22 Nov 2014 18:03:20 +0000 (13:03 -0500)]
inspector: Show object title in the signals tab
Matthias Clasen [Sat, 22 Nov 2014 16:41:24 +0000 (11:41 -0500)]
inspector: Show object title in the properties tab
Replace the search bar with a search entry in a stack to make
this work without unseemly height changes.
Matthias Clasen [Sat, 22 Nov 2014 14:53:40 +0000 (09:53 -0500)]
inspector: Show object title in the misc tab
Matthias Clasen [Sat, 22 Nov 2014 20:40:46 +0000 (15:40 -0500)]
inspector: Store object title on object
Matthias Clasen [Sat, 22 Nov 2014 11:46:28 +0000 (06:46 -0500)]
inspector: Drop an unused argument
Matthias Clasen [Sat, 22 Nov 2014 18:02:56 +0000 (13:02 -0500)]
inspector: Trivial typo fix
Matthias Clasen [Sat, 22 Nov 2014 01:58:25 +0000 (20:58 -0500)]
GtkGLArea: Formatting fixes
Jasper St. Pierre [Sat, 22 Nov 2014 17:07:51 +0000 (09:07 -0800)]
gdkinternals: Document our drawing and painting process better
Jasper St. Pierre [Sat, 22 Nov 2014 18:17:22 +0000 (10:17 -0800)]
gdkgl: Texture quads in one giant draw call
This requires us to use GL_TRIANGLES and six verts per quad instead
of four, which makes me think it might not be worth it on
well-optimized GL drivers. However, from talking to some driver
developers about it, the GL_TRIANGLES should be faster, since this
means that there's one giant contiguous buffer instead of many small
buffers.
If we were really rendering a lot of quads, I'd use an element buffer
and GL_PRIMITIVE_RESTART, but we're really not ever rendering that
many quads, and the setup cost for that would just be too annoying.
Jasper St. Pierre [Sat, 22 Nov 2014 18:12:58 +0000 (10:12 -0800)]
gdkgl: Use one VBO for both position and uv attributes
Jasper St. Pierre [Sat, 22 Nov 2014 17:47:35 +0000 (09:47 -0800)]
gdkgl: Texture many quads at once for performance reasons
This isn't fully performant yet. To be fully performant, we'd need to
do everything in one giant buffer.
Jasper St. Pierre [Sat, 22 Nov 2014 18:01:51 +0000 (10:01 -0800)]
gdkglcontext-x11: Make sure to enable the scissor test
Jasper St. Pierre [Sat, 22 Nov 2014 17:39:18 +0000 (09:39 -0800)]
gdkgl: Use a GdkTexturedQuad struct to paint quads
We'll soon have a new function that paints multiple quads.
Jasper St. Pierre [Sat, 22 Nov 2014 17:29:27 +0000 (09:29 -0800)]
gdkgl: Clean up program-manipulating code
Abstract the program ID and locations into a "program struct" which
we then use.
Jasper St. Pierre [Sat, 22 Nov 2014 16:12:22 +0000 (08:12 -0800)]
gdkwindow: Clean up whitespace slightly
This has been bothering me for a while.
Jasper St. Pierre [Sat, 22 Nov 2014 16:08:34 +0000 (08:08 -0800)]
gdkwindow: Don't pass the region to the impl when beginning a paint
It's unused. At the same time, rename "begin_paint_region" to
"begin_paint". This will help us clean up how GDK painting works
in the future to allow more creative use of double-buffering.
Jasper St. Pierre [Sat, 22 Nov 2014 16:06:09 +0000 (08:06 -0800)]
quartz: Don't bother storing the paint_clip_region
It's unused.
Marco Trevisan (Treviño) [Fri, 21 Nov 2014 03:44:44 +0000 (04:44 +0100)]
mir: initialize surface name with program name
Josef Andersson [Thu, 20 Nov 2014 20:55:11 +0000 (20:55 +0000)]
Updated Swedish translation
Piotr Drąg [Thu, 20 Nov 2014 15:46:38 +0000 (16:46 +0100)]
Updated POTFILES.in
Alexander Larsson [Thu, 20 Nov 2014 14:36:21 +0000 (15:36 +0100)]
GL: Fix typo in gdk_gl_texture_from_surface
Got a sign wrong in commit
800c712738f5666937e32d9f8cb32353513b9423
Chun-wei Fan [Thu, 20 Nov 2014 14:35:05 +0000 (22:35 +0800)]
Visual Studio Builds: Fix gdkconfig.h Generation
...for Broadway builds, as it was producing a wrongly-named check file for
that configuration, so that a clean would not be correctly performed and
subsequently affected rebuilds.
Alexander Larsson [Thu, 20 Nov 2014 11:22:06 +0000 (12:22 +0100)]
GdkGLContext: Remove unused update vfunc
The update virtual function for GdkGLContext is unused and is a
leftover from a previous GL approach. Just remove it.
https://bugzilla.gnome.org/show_bug.cgi?id=739750
Alexander Larsson [Thu, 20 Nov 2014 10:53:09 +0000 (11:53 +0100)]
GL: Fix GL Y coordinate flipping to use unscaled window height
This is needed in the edge case where the X11 backend rounded the actual
size, and the GL flipping really needs the correct window height to
do proper Y coordinate flipping.
https://bugzilla.gnome.org/show_bug.cgi?id=739750
Alexander Larsson [Thu, 20 Nov 2014 10:50:11 +0000 (11:50 +0100)]
Add gdk_window_get_unscaled_size
This is required for the X backend GL integration. If the
window has a height that is not a multiple of the window scale
we can't properly do the y coordinate flipping that GL needs.
Other backends can ignore this and use the default implementation.
https://bugzilla.gnome.org/show_bug.cgi?id=739750
Alexander Larsson [Thu, 20 Nov 2014 09:42:55 +0000 (10:42 +0100)]
x11: Return the exact pixel coverage in get_frame_extents
Rather than just rounding down the position *and* the size separately
we correctly calculate a rectangle in scaled window coords that fully
covers the real window size. This really only makes a difference
when the window size/position isn't a multiple of the window scale.
https://bugzilla.gnome.org/show_bug.cgi?id=739750
Owen W. Taylor [Thu, 6 Nov 2014 22:17:45 +0000 (17:17 -0500)]
x11: Keep track of the exact size in X pixels of windows
Keep track of the exact size of X windows in underlying pixels; we
generally use the scaled size instead, but to properly handle the GL
viewport for windows that aren't a multiple of window_scale,
we need to know the real size.
https://bugzilla.gnome.org/show_bug.cgi?id=739750
Owen W. Taylor [Thu, 6 Nov 2014 21:17:33 +0000 (16:17 -0500)]
x11: round the scaled size *up* when we get a ConfigureNotify
Although we specify a resize increment to try and get a size that is
a multiple of the window scale, maximization typically wins
over the resize increment, so the window might be odd sized.
Round *up* in this case, rather than down, since it's better to
truncate a line or two at the bottom and right of the window rather
than have a line or two that we don't know what to do with.
https://bugzilla.gnome.org/show_bug.cgi?id=739750
Marco Trevisan (Treviño) [Thu, 20 Nov 2014 04:51:12 +0000 (05:51 +0100)]
mir: use proper naming for mir window type checking macro
Marco Trevisan (Treviño) [Thu, 20 Nov 2014 03:41:45 +0000 (04:41 +0100)]
mir: add public getter for the internal MirSurface
Marco Trevisan (Treviño) [Thu, 20 Nov 2014 03:41:06 +0000 (04:41 +0100)]
mir: don't use struct MirConnection*, just the latter
Marco Trevisan (Treviño) [Tue, 18 Nov 2014 21:23:52 +0000 (22:23 +0100)]
mir: add OpenGL support
Implement GdkGLContext using EGL and use hardware mir surfaces
when a GdkWindow uses gl rendering.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=740346
Matthias Clasen [Wed, 19 Nov 2014 13:40:10 +0000 (14:40 +0100)]
GtkModelButton: Don't show both text and icon
The intention was that ::iconic indicates which representation is
preferred (text or icon). We fall back to the other representation
if one is missing.